<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'zhuce.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  <title>注册页面</title>
    <style>
        #d{
            text-align: center;
            height: 300px;
            width: 300px;
            margin-top: 50px;
            padding-top: 50px;
            background: -webkit-linear-gradient(lightpink,lightskyblue);//谷歌
        height: 200px;width: 300px;
            border-radius: 5%;
            box-shadow:5px 1px 1px gray;
        }
        #d input{
            margin-top: 10px;
        }
    </style>
</head>
<body >

<div align="center">
    <form  id="form1" action="zhuceServlet" method="POST" >
        <div id="d">
            用户&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：<input  type="text" name="name" placeholder="请输入姓名" onblur="checkUsername()"><br>
            密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：<input  type="password" name="pwd" placeholder="请输入密码" ><br>
            确认密码: <input  type="password" name="pwd1" placeholder="请再次输入密码"><br>
            邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱： <input type="email" name="ema"placeholder="请输入邮箱" "><br>
            <input type="submit" id="inBtnSub" value="注册" )">
            <input  type="reset" name="reset" value="重置" ><br>
        </div>
    </form>
</div>

<!-- <script>
    //判断用户名
    function checkUsername()
    {var user = document.getElementsByName("name")[0].value;
        if(user.length==0||user.length>10)
        {
            alert("请输入正确的帐号");
        }
    }

   
    //验证密码
    function checkPwd(){
        if(document.getElementsByName("pwd")[0].value!=document.getElementsByName("pwd1")[0].value)
        {
            alert("两次输入密码不同");
            return;}
        document.getElementById("form1").submit();
    }
    
  //判断邮箱
    function isEmail() {
        var user4 = document.getElementsByName("ema")[0].value;
        var myre = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
        if(!myre.test(user4.value))//对输入的值进行判断
        {
            alert('提示请输入有效的E_mail！');
            myre.focus();
            return false;
        }
    }
</script> -->
</body>
</html>
